import request from '@/utils/request';

// 获取账户信息
export function getAccountInfo() {
  return request({
    url: '/api/withdrawal/accountInfo',
    method: 'get'
  });
}

// 提交提现申请
export function submitWithdrawal(data) {
  return request({
    url: '/api/withdrawal/apply',
    method: 'post',
    data: data
  });
}

// 获取提现记录
export function getWithdrawalRecords(params) {
  return request({
    url: '/api/withdrawal/records',
    method: 'get',
    params: params
  });
}

// 取消提现申请
export function cancelWithdrawal(id) {
  return request({
    url: `/api/withdrawal/cancel/${id}`,
    method: 'post'
  });
}
